import Cookies from 'js-cookie'

const TokenKey = 'lansoft-token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token: string) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getCookie(name: string, params?: object) {
  return Cookies.get(name, params)
}

export function setCookie(name: string, value: string, params?: object) {
  return Cookies.set(name, value, params)
}

export function removeCookie(name: string, params?: object) {
  return Cookies.remove(name, params)
}